package controlador;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import vista.VentanaMenu;

public class ControladorVentanaMenu implements ActionListener{
	
	private VentanaMenu ventanaMenu;
	
	public ControladorVentanaMenu() {
		super();
		this.ventanaMenu = new VentanaMenu();
		this.ventanaMenu.setLocationRelativeTo(null);
		this.ventanaMenu.setVisible(true);
		this.ventanaMenu.addListener(this);
	}
	
	@Override
	public void actionPerformed(ActionEvent e) {
		String actionCommand = e.getActionCommand();
		if (actionCommand.equals("Salir")) {
			System.exit(0);
		}		
		else if (actionCommand.equals("Nueva Frase")) {
			new ControladorVentanaFrase();
		}
		else if (actionCommand.equals("JUGAR")) {
			new ControladorVentanaNivel();
		}
		else if (actionCommand.equals("Listado")) {
			new ControladorVentanaListado();
		}
	}

}
